package com.googlecode.garbagecan.asmstudy.classloader;

public class Test {
	public static void main(String[] args) throws Exception {
		for (int i = 0; i < 10; i++) {
			CustomClassLoader loader = new CustomClassLoader(Test.class.getClassLoader());
			Class<?> clazz = loader.loadClass("com.googlecode.garbagecan.asmstudy.classloader.HelloWorld");
			Object instance = clazz.newInstance();
			clazz.getMethod("sayHello").invoke(instance);
			Thread.sleep(5 * 1000);
		}
	}
}
